package com.cgsd.heyu.http;

import com.google.gson.Gson;

import java.io.Serializable;

/**
 * @author xiaoxing
 * Created by pengsheng-2 on 2018/5/25.
 */

public class ErrorMessage implements Serializable {
    private int code;
    private String message;
    private Object body;

    public ErrorMessage(String message) {
        this.message = message;
    }

    public ErrorMessage(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public ErrorMessage(int code, String message,Object body) {
        this.code = code;
        this.message = message;
        this.body = body;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getBody() {
        return body;
    }

    public void setBody(Object body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
